package com.kadron.service;

import java.io.Serializable;

import org.jboss.seam.annotations.AutoCreate;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;

import com.kadron.dao.KCommonDAO;
import com.kadron.entity.User;
import com.kadron.entity.UserHistory;

@AutoCreate
@Name("userHistoryService")
public class UserHistoryService implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 6146253593516237850L;
	
	@In
	private KCommonDAO commonDAO;
	
	public void create(User user, String action, String type, String text) {
		UserHistory history = new UserHistory(user, action, type, text);
		commonDAO.update(history);
	}
	
}
